#include "ftdLog.h"
//#include "ftdFile.h"
#include "commDef.h"
#include <iostream>
#include <fstream>

using namespace ftd;

ftdLog::ftdLog()
{

}

ftdLog::~ftdLog()
{

}

FTDBOOL ftdLog::printLog(FTDSTRING strLog/* ="NOTHING" */,FTDBOOL isInFile/*=FTDFALSE*/,FTDSTRING fileName/* ="log.txt" */)
{
	std::ofstream ofile(fileName,std::ios_base::app);
	if (!ofile.is_open())
	{
		return FTDFALSE;
	}
	// Windows log 
#ifdef WIN32
	if (isInFile)
	{
		ofile << strLog.c_str() << std::endl;
	}
	else
	{
		std::cout << strLog.c_str() << std::endl;
	}
#endif

	// Android log 
#ifdef ANDROID
#endif

	// IOS log 
#ifdef IOS
#endif

	return FTDTRUE;
}